package kr.re.kitri.bubble;

public class BubbleSort {
	
	public void sorting(int[] num){
		int[] b=num;
		for (int i = 0; i < num.length-1; i++) {
			for (int j = 0; j < num.length-1-i; j++) {
				int temp=0;
				if (b[j]>b[j+1]) {
					temp = num[j];
					b[j] = b[j+1];
					b[j+1] = temp;
				}				
			}
		}
		
		for (int i = 0; i < b.length; i++) {
			System.out.print(b[i]+"\t");			
		}
	}
}
